/*
 * @Author: 关棺 3156298705@qq.com
 * @Date: 2025-01-07 16:23:55
 * @LastEditors: 关棺 3156298705@qq.com
 * @LastEditTime: 2025-01-07 16:25:44
 * @FilePath: \supervision-ui\src\api\file\permission.js
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
import request from '@/utils/request';

// 查询文件权限列表
export function listPermission(query) {
  return request({
    url: '/system/permission/list',
    method: 'get',
    params: query,
  });
}

// 查询文件权限详细
export function getPermission(permissionId) {
  return request({
    url: '/system/permission/' + permissionId,
    method: 'get',
  });
}

// 新增文件权限
export function addPermission(data) {
  return request({
    url: '/system/permission',
    method: 'post',
    data: data,
  });
}

// 修改文件权限
export function updatePermission(data) {
  return request({
    url: '/system/permission',
    method: 'put',
    data: data,
  });
}

// 删除文件权限
export function delPermission(permissionId) {
  return request({
    url: '/system/permission/' + permissionId,
    method: 'delete',
  });
}
